<?php
session_save_path("/home/users/web/b2423/ipg.projectffcom/cgi-bin/tmp"); 
session_start();
$username = $_SESSION['username'];
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Edit Profile</title>
</head>

<style> 
body {
      background-color:#bbccff;
      background-repeat:no-repeat;
      overflow-x:hidden;
    }

.left_menu {
	background-color: #000;
	-moz-border-radius: 10px;
	-webkit-border-radius: 25px;
	border: 1px solid #000;
	padding-right: 20px;
	margin-right: 80px;
	margin-bottom: 15px;
	margin-left: 80px;
	height: 340px;
}
  #title {
	margin-top: 30px;
	margin-right: auto;
	margin-bottom: 50px;
	margin-left: auto;
}
	td{
	color: #FFF;
	text-align: center;
	padding: 15px;
}
  .left_menu_cells {
	border-bottom-width: medium;
	border-bottom-style: solid;
	border-bottom-color: #FFF;
}

#container {
	width: auto;
	height: 340px;
	background:#000;
	border: 3px #000 solid;
	border-radius: 1em;
	-moz-border-radius: 1em;
	-webkit-border-radius: 1em;
}
  .main_div {
	width: 900px;
	min-height:1000px;
	margin-top: 0px;
	margin-right: auto;
	margin-bottom: 100px;
	margin-left: auto;
	border: 3px #000 solid;
	border-radius: 1em;
	-moz-border-radius: 1em;
	-webkit-border-radius: 1em;
}
a {
	text-decoration: none;
	color:#FFF;
}
  </style> 
  
 </head> 
<body> 
<div class="main_div">
 
 <div id="title" align="center"><img src="../images/title.png" width="431" height="114" align="middle"></div>
 <div>
 <table class="left_menu" align="left" >
 <tr >
<td class="left_menu_cells" colspan="3"><a href="main.php">Home</a></td>
</tr>

<tr>
<td class="left_menu_cells" colspan="3"><a href="new_league.html">Create a League</a></td>
</tr>

<tr>
<td class="left_menu_cells" colspan="3">View Leagues</td>
</tr>

<tr>
<td class="left_menu_cells" colspan="3"><a href="find_friends.html">Find Friends</a></td>
</tr>

<tr>
<td colspan="3">Log-off</td>
</tr>

</table>
<table id="container">
<tr>
<td>
<form enctype="multipart/form-data" action="pic_uploader.php" method="POST">Upload a new profile pic: <input name="uploadedfile" type="file" style="background:#FFF;"/>
<input type="submit" name="submit" value="Upload" />
</form>
</td>
</tr>
<td>
<img src=<?php 
		$con = mysql_connect("projectffcom.ipagemysql.com", "admin_user", "poghjk123"); 
		mysql_select_db(main, $con);
		$query = mysql_query("SELECT PROFILE_PIC FROM 
								USER_INFO WHERE USERNAME = '".$username."'");
								
		$row = mysql_fetch_array($query);
		
		/*if(mysql_num_rows($query) != 1)
			echo '"profile pics/default.jpg"';
        else*/
        	echo '"'.$row['PROFILE_PIC'].'"';
		?>/>
</td>
<tr>
</tr>
</table>
</div>
</body> 
</html>
